//
//  TagItem.swift
//  Employee
//
//  Created by tancheng on 2018/7/25.
//  Copyright © 2018年 remotevillage. All rights reserved.
//

import Foundation

class TagItem: UIView {
    
     init(frame: CGRect,title:String) {
        super.init(frame: frame)
       setupUI(title)
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private func setupUI(_ title: String) {
        
        backgroundColor = UIColor.hex("#f5f5f5")
        //layer.cornerRadius = 2
        //layer.masksToBounds = true
        
        let lab = UILabel()
        lab.font = GlobalConfig.system14Font
        lab.textColor = GlobalConfig.TextDeepColor
        lab.text = title
        
        addSubview(lab)
        lab.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.left.equalToSuperview().offset(10)
            //make.right.equalToSuperview().offset(-10)
        }
        
    }
    
}
